package com.tommy.jiami.ui;


import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.AbsListView;

import com.tommy.jiami.R;
import com.tommy.jiami.view.MediaView;

public class EncryptedActivity extends AppCompatActivity
implements AbsListView.MultiChoiceModeListener
{	
	MediaView encrypted;
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(encrypted);
		Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar) ;
		setSupportActionBar(toolbar);
		encrypted=new MediaView(this,MediaView.TYPE_ENCRYPTED);
		encrypted.init();
		encrypted.setChoiceMode(MediaView.CHOICE_MODE_MULTIPLE_MODAL);
		encrypted.setMultiChoiceModeListener(this);
	}
	
	@Override
	public boolean onCreateActionMode(ActionMode mode, Menu menu)
	{
		menu.add(1,1,1,"复原").setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
		return true;
	}

	@Override
	public boolean onActionItemClicked(ActionMode mode, MenuItem item)
	{
		
		return false;
	}
	
	@Override
	public boolean onPrepareActionMode(ActionMode mode, Menu menu){return false;}
	@Override
	public void onDestroyActionMode(ActionMode mode){}
	@Override
	public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean isChecked){}	
}
